package cc.yugu.yhdw.common.protocol.msg05;

import cc.yugu.yhdw.common.protocol.MsgCode;
import io.netty.buffer.ByteBuf;

public class Msg052000003 extends Msg052 {

    public String boxNum;
    public String batteryNo;
    public String volume;
    public byte chargeStage;

    @Override
    public int getMsgCode() {
        return MsgCode.MSG_052000003.getCode();
    }

    @Override
    public void readData(ByteBuf buffer) {
        readRtn(buffer);
        boxNum = readString(buffer);
        batteryNo = readString(buffer);
        volume =readString(buffer);
        chargeStage = buffer.readByte();
    }

    @Override
    public void writeData(ByteBuf buffer) {
        writeRtn(buffer);
        writeString(buffer, boxNum);
        writeString(buffer, batteryNo);
        writeString(buffer, volume);
        buffer.writeByte(chargeStage);
    }
}
